package com.fuchuang.seckillsystem.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@ExcelTarget("orderInfo")
public class OrderInfo implements Serializable {
    
    //订单id
    @Excel(name = "订单id")
    private Integer id;
    //支付价格
    @Excel(name = "支付价格")
    private BigDecimal payPrice;
    //秒杀活动名称
    @Excel(name = "所属活动")
    private String activityName;
    //商品名称
    @Excel(name = "购买商品")
    private String goodsName;
    //用户名称
    @Excel(name = "购买用户")
    private String username;
    //用户id
    @Excel(name = "用户id")
    private Integer userId;
    //订单下单时间
    @Excel(name = "下单时间", exportFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    //    //订单支付时间
    @Excel(name = "支付时间", exportFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date payTime;
    //订单支付状态
    @Excel(name = "支付状态", replace = {"已支付_1", "未支付_0", "已取消_-1"})
    private Integer payStatus;
    
}
